//////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////
#include "include.h"

void MCU_SystemInit(void)
{
	P10_PushPull_Mode; //LT2911R_RST_N
	P11_PushPull_Mode; //LT2911R_RST_N  
	P13_OpenDrain_Mode;//SCL_CTL
	P14_OpenDrain_Mode;//SDA_CTL
	P12_Input_Mode;    //IRQ

	//EA=1;
  InitialUART0_Timer1(115200);//UART_INTI


  Enable_INT_Port0;
	Enable_BIT3_FallEdge_Trig;
	//Enable_BIT4_LowLevel_Trig
	set_EPI;

	//set_EX1;
	//set_IT1;
  //set_IE1;
	set_EA;
}


void LT9211_Reset(void)
{
   P11 = 0;
   Timer0_Delay1ms(100);
   P11 = 1;
   Timer0_Delay1ms(100);
}


/*********************************/	   
//uart print function
//printdec_u32(u32 u32_dec);
//print(char* fmt, ...);
/*********************************/

void main(void)
{
	MCU_SystemInit();
	Timer0_Delay1ms(100);
	print("\r\nmcu start*************************");
	LT9211_Reset();
	LT9211_Config();
	while(1);
}
